package cn.iocoder.an.module.business.dal.mysql.maintenanceclassification;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.maintenanceclassification.MaintenanceClassificationDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.maintenanceclassification.vo.*;

/**
 * 维修分类 Mapper
 *
 * @author zzy
 */
@Mapper
public interface MaintenanceClassificationMapper extends BaseMapperX<MaintenanceClassificationDO> {

    default PageResult<MaintenanceClassificationDO> selectPage(MaintenanceClassificationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MaintenanceClassificationDO>()
                .likeIfPresent(MaintenanceClassificationDO::getName, reqVO.getName())
                .eqIfPresent(MaintenanceClassificationDO::getStatus, reqVO.getStatus())
                .eqIfPresent(MaintenanceClassificationDO::getDescription, reqVO.getDescription())
                .orderByDesc(MaintenanceClassificationDO::getId));
    }

}